<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>欢迎</title>
<link href="/style/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="/js/jplugin/jquery.blockUI.js"></script>
<style type="text/css">
	.wrap{
		width:760px;
		margin:0 auto;
	}
</style>
<script>
	function pop(){
		$.blockUI({
			message:'<div><img src="/images/loading.gif"></div>',
			css : {
				
			}
		});
		
		$.ajax({
			url:'/login4pop',
			data:{},
			cache:false,
			dataType:'html',
			success:function(xhr){
				showPop(xhr);
				drag();
			}
		});
	}
	function showPop(_str){
		var $pop = $("div[class*=blockUI][class*=blockMsg][class*=blockPage]");
		$pop.html(_str);
	}
	function drag(){
		var $pop = $("div[class*=blockUI][class*=blockMsg][class*=blockPage]");
		var $hd = $pop.find(".hd");
		
        var intX;
        var intY;
        var blnDrag = false; //鼠标是否已经按下
		
		$hd.mousedown(function(event){
			//1.获取鼠标初次点击的位置
			
            blnDrag = true;
            intX = event.clientX - $pop[0].style.pixelLeft;
            intY = event.clientY - $pop[0].style.pixelTop;
		});
		
		$hd.mouseover(function(e){

			
            if (!blnDrag) {
                return false;
            }
            else {
                $pop[0].style.pixelLeft = event.clientX - intX;
                $pop[0].style.pixelTop = event.clientY - intY;
            }
		});
		
		$hd.mouseup(function(e){
			 blnDrag = false;
		});


	}
</script>
</head>
<body>
	<div class="wrap">
		<a href="javascript:pop()">POP</a>
	</div>
</body>

</html>








